<div *ngIf="role" class="form-horizontal">
    <div class="row">
        <div class="form-group col-sm-4">
            <label class="form-control-label">ID:</label>
            <input [(ngModel)]="role.role_id" placeholder="角色ID" class="form-control" required readonly />
        </div>
        <div class="form-group col-sm-4">
            <label class="form-control-label">角色名称:</label>
            <input [(ngModel)]="role.role_name" placeholder="角色名称" class="form-control" required />
        </div>
        <div class="form-group col-sm-4">
            <label for="status" class="form-control-label">是否有效:</label>
            <select class="form-control" id="status" [(ngModel)]="role.status">
                <option>YES</option>
                <option>NO</option>
            </select>
        </div>
    </div>
    <div class="row">
        <div class="form-group">
            <div class="col-sm-1">
                <button class="btn btn-danger" *ngIf="role.role_id" (click)="delete()">禁用</button>
            </div>
            <div class="offset-sm-9 col-sm-1">
                <button class="btn btn-default" (click)="cancel()">取消</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" (click)="save()">保存</button>
            </div>
        </div>
    </div>
</div>